//
// Copyright (c) 2009-2011, chunquedong
//
// This file is part of ChunMap project
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
//
// History:
//   2011-09-30  Jed Young  Creation
//

using gfx
using gfx2

using chunmapModel
using chunmapData
using chunmapRaster

**
** draw geometry
**
@Js
const abstract class GeometrySym : Symbolizer
{
  override Void draw(RenderEnv r)
  {
    if(r.data isnot Shape) return
    Shape shp := r.data

    geom := shp.geometry
    if (geom is GeometryCollection)
    {
      GeometryCollection geoCollection := geom
      geoCollection.each { drawGeometry(it, r) }
    }
    else
    {
      drawGeometry(geom, r)
    }
  }

  abstract Void drawGeometry(Geometry geom, RenderEnv r)
}